import React,{useEffect} from 'react'
const List=()=>{
    const handle=():Promise<string>=>{
        return new Promise((resolve,reject)=>{
            setTimeout(()=>{
                resolve("hello promise")
            },1000)
        })
    }
    useEffect(() => {
        async function fetchData(){
            const res =await handle()
            console.log(res)
        }
        fetchData()
        
    }, [])
    return <div>list</div>
}

export default List